home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-03-25 | 1.5 KB | 55 lines | [TEXT/CWIE] |
- // ===========================================================================
- // CNeuroSimPane.h ©1996 Timo Eloranta
- // ===========================================================================
- // This class takes care of displaying the picture of the neural net.
- // Derived from the PowerPlant LView class.
-
- #pragma once // Include this header only once
-
- #include <LView.h>
-
- #include "NS_Types.h"
-
- class LGWorld;
- class CNeuralNet;
-
- class CNeuroSimPane : public LView {
- public:
- enum {
- class_ID = 'NePa' // ID used by Metrowerks Constructor
- };
-
- static CNeuroSimPane* CreateNeuroSimPaneStream( LStream *inStream );
-
- CNeuroSimPane( LStream *inStream );
- virtual ~CNeuroSimPane();
-
- virtual void SetNet( CNeuralNet * inNet );
-
- virtual void InvalidateDrawing();
-
- protected:
- CNeuralNet *mNet; // Our net object
- LGWorld *mGWorld; // Our offscreen graphics world
-
- Uint16 mGridSize; // Size of the net
-
- Rect mOneOneRect; // The rect of the [1,1] neuron
- Rect mGridRect; // The rect of the whole matrix
-
- Boolean mDrawingIsDirty; // Redraw needed ?
- Boolean mBackgroundIsDirty; // Redraw needed (bg) ?
-
- virtual void ClickSelf( const SMouseDownEvent &inMouseDown);
-
- virtual Boolean PointToSquare( const Point & inPoint,
- Uint16 & outCol,
- Uint16 & outRow );
- virtual void DrawSelf();
- virtual void DrawTheNet();
- virtual void DrawBackground();
- virtual void DrawConnections();
- virtual void DrawNeurons();
- virtual void DrawFrame();
- };
-